package com.magic.smartcity.ioc;

/**
 * @description:
 * @create: Create by Magic on 2022/2/5.
 */

import com.magic.smartcity.interfaces.INewsModel;
import com.magic.smartcity.interfaces.INewsPresenter;
import com.magic.smartcity.interfaces.ISystemServicesModel;
import com.magic.smartcity.interfaces.ISystemServicesPresenter;
import com.magic.smartcity.interfaces.IUserModel;
import com.magic.smartcity.interfaces.IUserPresenter;
import com.magic.smartcity.model.NewsModel;
import com.magic.smartcity.model.SystemServicesModel;
import com.magic.smartcity.model.UserModel;
import com.magic.smartcity.presenters.NewsPresenter;
import com.magic.smartcity.presenters.SystemServicePresenter;
import com.magic.smartcity.presenters.UserPresenter;

import javax.inject.Singleton;

import butterknife.BindView;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.android.components.ActivityComponent;
import dagger.hilt.android.components.FragmentComponent;
import dagger.hilt.android.internal.managers.ApplicationComponentManager;


@InstallIn({FragmentComponent.class, ActivityComponent.class})
@Module
public abstract class MyModule {


    @Binds
    abstract INewsPresenter bindsNewsPresenter(NewsPresenter presenter);


    @Binds
    abstract INewsModel providersNewsModel(NewsModel newsModel);

    @Binds
    abstract IUserModel providersUserModel(UserModel userModel);

    @Binds
    abstract IUserPresenter providersUserPresenter(UserPresenter userPresenter);

    @Binds
    abstract ISystemServicesPresenter providersSystemServicesPresenter(SystemServicePresenter systemServicePresenter);

    @Binds
    abstract ISystemServicesModel providerSystemServicesModel(SystemServicesModel systemServicesModel);

}
